/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package proyecto1.View;

import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.event.WindowFocusListener;
import java.awt.event.WindowListener;
import javax.swing.ImageIcon;

/**
 *
 * @author alex
 */
public class Principal extends javax.swing.JFrame {
    
    /**
     * Creates new form Principal
     */
    public Principal() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        itmIniciarSesion = new javax.swing.JMenuItem();
        mnCerrarSesion = new javax.swing.JMenuItem();
        itmCerrarSesion = new javax.swing.JMenuItem();
        mnSocios = new javax.swing.JMenu();
        mnReuniones = new javax.swing.JMenu();
        mnPagos = new javax.swing.JMenu();
        mnAsistencia = new javax.swing.JMenu();
        mnDeudas = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("PRINCIPAL");
        setBackground(new java.awt.Color(240, 87, 167));
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/IMAGENES/SilverLightWithLogo.jpg"))); // NOI18N

        jMenu1.setText("Ingreso");
        jMenu1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenu1ActionPerformed(evt);
            }
        });

        itmIniciarSesion.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_I, java.awt.event.InputEvent.CTRL_MASK));
        itmIniciarSesion.setText("Iniciar Sesion");
        itmIniciarSesion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itmIniciarSesionActionPerformed(evt);
            }
        });
        jMenu1.add(itmIniciarSesion);

        mnCerrarSesion.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.CTRL_MASK));
        mnCerrarSesion.setText("Cerrar Sesion");
        mnCerrarSesion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnCerrarSesionActionPerformed(evt);
            }
        });
        jMenu1.add(mnCerrarSesion);

        itmCerrarSesion.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_MASK));
        itmCerrarSesion.setText("Salir");
        itmCerrarSesion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itmCerrarSesionActionPerformed(evt);
            }
        });
        jMenu1.add(itmCerrarSesion);

        jMenuBar1.add(jMenu1);

        mnSocios.setText("Socios");
        mnSocios.addMenuListener(new javax.swing.event.MenuListener() {
            public void menuSelected(javax.swing.event.MenuEvent evt) {
                mnSociosMenuSelected(evt);
            }
            public void menuCanceled(javax.swing.event.MenuEvent evt) {
            }
            public void menuDeselected(javax.swing.event.MenuEvent evt) {
            }
        });
        mnSocios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnSociosActionPerformed(evt);
            }
        });
        jMenuBar1.add(mnSocios);

        mnReuniones.setText("Reuniones");
        mnReuniones.addMenuListener(new javax.swing.event.MenuListener() {
            public void menuSelected(javax.swing.event.MenuEvent evt) {
                mnReunionesMenuSelected(evt);
            }
            public void menuCanceled(javax.swing.event.MenuEvent evt) {
            }
            public void menuDeselected(javax.swing.event.MenuEvent evt) {
            }
        });
        jMenuBar1.add(mnReuniones);

        mnPagos.setText("Pagos");
        mnPagos.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                mnPagosMouseClicked(evt);
            }
        });
        mnPagos.addMenuListener(new javax.swing.event.MenuListener() {
            public void menuSelected(javax.swing.event.MenuEvent evt) {
                mnPagosMenuSelected(evt);
            }
            public void menuCanceled(javax.swing.event.MenuEvent evt) {
            }
            public void menuDeselected(javax.swing.event.MenuEvent evt) {
            }
        });
        mnPagos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnPagosActionPerformed(evt);
            }
        });
        jMenuBar1.add(mnPagos);

        mnAsistencia.setText("Asistencia");
        mnAsistencia.addMenuListener(new javax.swing.event.MenuListener() {
            public void menuSelected(javax.swing.event.MenuEvent evt) {
                mnAsistenciaMenuSelected(evt);
            }
            public void menuCanceled(javax.swing.event.MenuEvent evt) {
            }
            public void menuDeselected(javax.swing.event.MenuEvent evt) {
            }
        });
        jMenuBar1.add(mnAsistencia);

        mnDeudas.setText("Deudas");
        mnDeudas.addMenuListener(new javax.swing.event.MenuListener() {
            public void menuSelected(javax.swing.event.MenuEvent evt) {
                mnDeudasMenuSelected(evt);
            }
            public void menuCanceled(javax.swing.event.MenuEvent evt) {
            }
            public void menuDeselected(javax.swing.event.MenuEvent evt) {
            }
        });
        mnDeudas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnDeudasActionPerformed(evt);
            }
        });
        jMenuBar1.add(mnDeudas);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 1210, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void mnSociosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnSociosActionPerformed
        
    }//GEN-LAST:event_mnSociosActionPerformed

    private void mnSociosMenuSelected(javax.swing.event.MenuEvent evt) {//GEN-FIRST:event_mnSociosMenuSelected
        
        new proyecto1.View.Socio().setVisible(true);
        
    }//GEN-LAST:event_mnSociosMenuSelected

    private void mnReunionesMenuSelected(javax.swing.event.MenuEvent evt) {//GEN-FIRST:event_mnReunionesMenuSelected
        new proyecto1.View.Reunion().setVisible(true);
    }//GEN-LAST:event_mnReunionesMenuSelected

    private void mnPagosMenuSelected(javax.swing.event.MenuEvent evt) {//GEN-FIRST:event_mnPagosMenuSelected
        new proyecto1.View.Pago().setVisible(true);
    }//GEN-LAST:event_mnPagosMenuSelected

    private void mnAsistenciaMenuSelected(javax.swing.event.MenuEvent evt) {//GEN-FIRST:event_mnAsistenciaMenuSelected
        new proyecto1.View.Asistencia().setVisible(true);
    }//GEN-LAST:event_mnAsistenciaMenuSelected

    private void mnDeudasMenuSelected(javax.swing.event.MenuEvent evt) {//GEN-FIRST:event_mnDeudasMenuSelected
        new proyecto1.View.Deuda().setVisible(true);
    }//GEN-LAST:event_mnDeudasMenuSelected

    private void jMenu1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenu1ActionPerformed
        
    }//GEN-LAST:event_jMenu1ActionPerformed

    private void itmIniciarSesionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itmIniciarSesionActionPerformed
        
    }//GEN-LAST:event_itmIniciarSesionActionPerformed

    private void mnPagosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnPagosActionPerformed
       new Pago().setVisible(true);
    }//GEN-LAST:event_mnPagosActionPerformed

    private void mnDeudasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnDeudasActionPerformed
        new proyecto1.View.Deuda().setVisible(true);
    }//GEN-LAST:event_mnDeudasActionPerformed

    private void itmCerrarSesionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itmCerrarSesionActionPerformed
        dispose();
    }//GEN-LAST:event_itmCerrarSesionActionPerformed

    private void mnPagosMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_mnPagosMouseClicked
        
    }//GEN-LAST:event_mnPagosMouseClicked

    private void mnCerrarSesionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnCerrarSesionActionPerformed
        Bloquear();
        
    }//GEN-LAST:event_mnCerrarSesionActionPerformed

    /**
     * @param args the command line arguments
     */
   
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem itmCerrarSesion;
    private javax.swing.JMenuItem itmIniciarSesion;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenu mnAsistencia;
    private javax.swing.JMenuItem mnCerrarSesion;
    private javax.swing.JMenu mnDeudas;
    private javax.swing.JMenu mnPagos;
    private javax.swing.JMenu mnReuniones;
    private javax.swing.JMenu mnSocios;
    // End of variables declaration//GEN-END:variables

    public void Bloquear(){
    
    jMenu1.setVisible(false);
    mnSocios.setVisible(false);
    mnReuniones.setVisible(false);
    mnPagos.setVisible(false);
    mnDeudas.setVisible(false);
    mnAsistencia.setVisible(false);

    }
    
    public void desbloquear(){
    
        jMenu1.setVisible(true);
    mnSocios.setVisible(true);
    mnReuniones.setVisible(true);
    mnPagos.setVisible(true);
    mnDeudas.setVisible(true);
    mnAsistencia.setVisible(true);
    
    
    }
    
    
    
}